package com.devshephard.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.devshephard.business.service.UpdateUserInfo;
import com.devshephard.entity.IUser;
import com.devshephard.mapper.IUserMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Service
@Component
public class UpdateUserInfoImpl implements UpdateUserInfo {

    @Autowired
    IUserMapper iUserMapper;
/*
    @Override
    public int updateUserInfo(String id) {
        IUser iUser = iUserMapper.selectOne(new LambdaQueryWrapper<IUser>().eq(IUser::getId,id));
        iUser.setName("专家信息");
        return iUserMapper.updateById(iUser);
    }*/

    @Override
    public int updateUserInfo(String id) {
        IUser iUser = iUserMapper.selectOne(new LambdaQueryWrapper<IUser>().eq(IUser::getId,id));
        iUser.setName("专家信息");
        return 1;
    }

}
